<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" th:href="@{/css/creation/creation.css}">
    <title>我的园子</title>
    <script src='https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js'></script>
</head>
<body>
<div id="contain">
    <div id="behavior">
        <ul id="behaviorcard">
            <li id="choose1" class="behaviors" onclick="beh1()"><a href="#" class="behaviors1">创作</a></li>
            <li id="choose2" class="behaviors" onclick="beh2()"><a href="#" class="behaviors1">草稿箱</a></li>
            <li id="choose3" class="behaviors" onclick="beh3()"><a href="#" class="behaviors1">回收站</a></li>
            <li id="choose4" class="behaviors" onclick="beh4()"><a href="#" class="behaviors1">已发布</a></li>
            <li id="choose5" class="behaviors" onclick="beh5()"><a href="#" class="behaviors1">上传实例</a></li>
            <li id="choose6" class="behaviors" onclick="beh6()"><a href="#" class="behaviors1">我的上传</a></li>
        </ul>
    </div>
    <div id="header">
        <label id="headlabel">

        </label>
    </div>
    <div id="cretionmain">

    </div>
</div>
<script>
    function beh1() {
        $.ajax({
            url: "/yuanwen/creationmain",
            type: "post",
            data: {
                objectid: ""
            },
            success: function (data) {
                $('#header').html("创作");
                $("#cretionmain").html(data);
            }
        })
    }

    function beh2() {
        $.ajax({
            url: "/yuanwen/creationmain1",
            type: "post",
            data: {
                numberpage: 1
            },
            success: function (data) {
                $('#header').html("草稿箱");
                $("#cretionmain").html(data);
            }
        })
    }

    function beh3() {
        $.ajax({
            url: "/yuanwen/creationmain2",
            type: "post",
            data:
                {
                    numberpage: 1
                },
            success: function (data) {
                $('#header').html("回收站");
                $("#cretionmain").html(data);
            }
        })
    }

    function beh4() {
        $.ajax({
            url: "/yuanwen/creationmain3",
            type: "post",
            data:
                {
                    numberpage: 1
                },
            success: function (data) {
                $('#header').html("已发布");
                $("#cretionmain").html(data);
            }
        })
    }

    function beh5() {
        $.ajax({
            url: "/yuanwen/creationmain4",
            type: "post",
            success: function (data) {
                $('#header').html("上传实例");
                $("#cretionmain").html(data);
            }
        })
    }

    function beh6() {
        var fromdata = new FormData();
        fromdata.append("numberpage", 1);
        $.ajax({
            url: "/yuanwen/creationmain5",
            type: "post",
            data: fromdata,
            cache: false,
            contentType: false,
            processData: false,
            success: function (data) {
                $('#header').html("我的上传");
                $("#cretionmain").html(data);
            }
        })
    }


</script>
</body>
</html>